<?php
namespace app\api\validate;
use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'toolid'        =>  'require|number',
        'articleid'     =>  'require|number',
        'content'       =>  'require',
    ];

    protected $message = [
        'toolid.require'    => '工具ID参数不能为空!',
        'toolid.number'     => '工具ID参数错误!',
        'articleid.require' => '文章ID参数不能为空!',
        'articleid.number'  => '文章ID参数错误!',
        'content.require'   => '文章内容参数不能为空!',
    ];

    protected $scene = [
        'index'         =>  ['toolid'],
        'edit'          =>  ['articleid','content'],
        'delete'        =>  ['articleid'],
    ];    
}